import request from '@/utils/request'

// 查询三码合一列表
export function listYards(query) {
  return request({
    url: '/mes/mobile/pro/yards/list',
    method: 'get',
    params: query
  })
}

// 查询三码合一详细
export function getYards(yardsId) {
  return request({
    url: '/mes/mobile/pro/yards/getYards' + yardsId,
    method: 'get'
  })
}

// 查询三码合一and铭牌模板
export function getInfo(workorderCode) {
  return request({
    url: '/mes/mobile/pro/yards/' + workorderCode,
    method: 'get'
  })
}

// 新增三码合一
export function addYards(data) {
  return request({
    url: '/mes/mobile/pro/yards',
    method: 'post',
    data: data
  })
}

// 修改三码合一
export function updateYards(data) {
  return request({
    url: '/mes/mobile/pro/yards',
    method: 'put',
    data: data
  })
}

// 删除三码合一
export function delYards(yardsId) {
  return request({
    url: '/mes/mobile/pro/yards/' + yardsId,
    method: 'delete'
  })
}
